<?php

namespace App\Modules\Admin\Http\Requests\Water;

use App\Modules\Admin\Entities\Member\UsersModel;
use App\Modules\Admin\Http\Requests\BaseRequest;

class UsersRequest extends BaseRequest
{
    public function setInstance()
    {
        $this->instance = UsersModel::getInstance();
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'username' => 'required',
            'nickname'   => 'required',
            'mobile'   => 'required',
        ];
    }

    public function messages()
    {
        return [
            'username.required' => '用户名/账户为必填项！',
            'nickname.required'   => '昵称/姓名为必填项！',
            'mobile.required'   => '手机号为必填项！',
        ];
    }

}
